Report post

What does 0 mean in HTML?

0 is for top-bottom and auto for left-right. The browser sets the margin. tells the browser to set the margin-left and margin-right properties of the element automatically which the browser accomplishes by giving both margins the same value.

What if I set a zero margin on a HTML element?

*,html,body { margin:0 !important; padding:0 !important; box-sizing: border-box !important;; } Setting a zero margin on the html element interferes with the scrolling on an iPad making it very jerky and sticky. You can't flick upwards and having it carry on scrolling, so be careful with this.

What does the first parameter 0 mean?

The first parameter 0 indicates that the top and bottom margins will both be set to 0. margin-top: 0; margin-bottom: 0; margin-left: auto; margin-right: auto;

What is a margin in HTML?

The browser selects a suitable margin to use. For example, in certain cases this value can be used to center an element. This property can be used to set a margin on all four sides of an element. Margins create extra space around an element, unlike padding, which creates extra space within an element.

Related articles

The World's Leading Crypto Trading Platform

Get my welcome gifts